
<template>
	<div class="index">

		<div class="center">
			<left></left>
			<div class="right">
          <top></top>
          <div class="hei10"></div>
          <div class="where" style="background: #fff; padding: 10px 30px; font-size: 14px; color: #595959;">当前位置：分销后台><router-link to="/orderManagement">我的订单</router-link></div>
          <div class="hei10"></div>
          
				<div class="o_ul">
					<router-link class="o_li act" to="/orderManagement">我的订单</router-link>
					<router-link class="o_li" to="/order_question/orderOther">分销商发展订单</router-link>
				</div>
				<div class="processing">
						<div class="pro_top">
							
							<el-form ref="form" @submit.native.prevent :model="search" label-width="100px">
								<div class="rtm">
									<el-select v-model="value2" multiple collapse-tags placeholder="筛选字段" @change="choosezd">
										<el-option
										  v-for="item in shaixuan" :key="item" :label="item" :value="item" >
										</el-option>
									</el-select>
								</div>
								<div class="orderflex">
									<el-form-item label="商品筛选">
										<el-select v-model="search.product_ids" multiple filterable collapse-tags remote reserve-keyword placeholder="请选择" >
											<el-option v-for="item in search.prolist" :key="item.id" :label="item.title" :value="item.id"></el-option>
										</el-select>
									</el-form-item>
									<el-form-item label="订单状态">
										<el-select v-model="search.status"  clearable placeholder="请选择订单状态">
<el-option :label="item.label" :value="item.value" v-for="(item,index) in peizhis.order_status" :key="index"></el-option>
										</el-select>
									</el-form-item>
                                    
                                    <el-form-item label="按照标旗">
                                    	<el-select v-model="search.color"  clearable placeholder="请选择颜色">
                                    	  <el-option label="灰" value="0">
                                    	         <span style="float: left"><div class="color1"></div></span><span class="color1s">灰</span>
                                    	  </el-option>
                                    	  <el-option label="红" value="1">
                                    	        <span style="float: left"><div class="color2"></div></span><span class="color2s">红</span>
                                    	  </el-option>
                                    	  <el-option label="黄" value="2">
                                    	        <span style="float: left"><div class="color3"></div></span><span class="color3s">黄</span>
                                    	  </el-option>
                                    	  <el-option label="绿" value="3">
                                    	        <span style="float: left"><div class="color4"></div></span><span class="color4s">绿</span>
                                    	  </el-option>
                                    	  <el-option label="蓝" value="4">
                                    	      <span style="float: left"><div class="color5"></div></span><span class="color5s">蓝</span>
                                    	  </el-option>
                                    	  <el-option label="紫" value="5">
                                    	      <span style="float: left"><div class="color6"></div></span><span class="color6s">紫</span>
                                    	  </el-option>
                                    	</el-select>
                                    </el-form-item>
									 <el-form-item label="订单来源" style=" margin-left: -15px;">
									    <el-input v-model="search.source"></el-input>
									</el-form-item>
								</div>
                                <div class="orderflex">
                                	<el-form-item label="订单ID">
                                		<el-input  v-model="search.orderid"></el-input>
                                	</el-form-item>
                                    <el-form-item label="外部订单编号">
                                    	<el-input  v-model="search.source_id"></el-input>
                                    </el-form-item>
                                    <el-form-item label="商品编码">
                                    	<el-input  v-model="search.product_sku"></el-input>
                                    </el-form-item>
                                </div>
                                <div class="orderflex">
                                	<el-form-item label="收件人电话">
                                		<el-input  v-model="search.address_mobile"></el-input>
                                	</el-form-item>
                                    <el-form-item label="生产号码">
                                        <el-input  v-model="search.plan_mobile_produced"></el-input>
                                    </el-form-item>
                                    <el-form-item label="身份证号">
                                        <el-input  v-model="search.id_num"></el-input>
                                    </el-form-item>
                                	
                                </div>
                                
								<div class="orderflex">
										<el-form-item label="创建时间">
											<el-date-picker style="width: 470px;" v-model="search.time"  value-format="yyyy-MM-dd HH:mm:ss" type="datetimerange" range-separator="——"
											 start-placeholder="开始日期" end-placeholder="结束日期">
											</el-date-picker>
										</el-form-item>
                                        <el-form-item label="修改时间">
                                        	<el-date-picker style="width: 470px;" v-model="search.timefix"  value-format="yyyy-MM-dd HH:mm:ss" type="datetimerange" range-separator="——"
                                        	 start-placeholder="开始日期" end-placeholder="结束日期">
                                        	</el-date-picker>
                                        </el-form-item>
								</div>
  
								<div class="orderflex ordersub">
									<el-button  type="danger" @click="dosearch()">查询</el-button>
									
									<el-button  type="danger" :loading="daochuing" v-if="func_I02" @click="daochu()">{{daochuingz}}</el-button>
                                    
                                    <el-button  type="danger" v-if="func_I02" @click="goupload">照片快速上传</el-button>
								</div>
								
								
							</el-form>
				
				
						</div>
						<div class="pro_center">
							<div class="orderlist" v-loading="loading">
								<div class="list eaeaea">
									<div class="th" style="width: 80px;" v-if="show.id">ID</div>
									<div class="th" v-if="show.source_id">外部订单编号</div>
                                    <div class="th" v-if="show.source">订单来源</div>
									<div class="th" v-if="show.created_at">下单时间</div>
                                    <div class="th" v-if="show.ordered_at">平台下单时间</div>
									<div class="th" v-if="show.product_name">商品名称</div>
                                    <div class="th" v-if="show.fetch_code">商品编码</div>
									<div class="th" v-if="show.plan_mobile">购买号码</div>
									<div class="th"  style="width: 80px;" v-if="show.status">订单状态</div>
									<div class="th" style="width: 80px;" v-if="show.id_card_name">证件姓名</div>
									<div class="th" v-if="show.id_card_num">身份证号</div>
                                    <div class="th" v-if="show.buyer_memo">买家备注</div>
									<div class="th" v-if="show.address">收货地址</div>
									<div class="th" v-if="show.address_mobile">联系电话</div>
									<div class="th" v-if="show.address_name">收货人</div>
									<div class="th" v-if="show.region_c">归属地</div>
									<div class="th" v-if="show.plan_mobile_produced">生产号码</div>
									<div class="th" v-if="show.seller_memo">操作记录</div>
									<div class="th" v-if="show.tracking_number">物流单号</div>
                                    <div class="th" v-if="show.tracking">物流公司</div>
									<div class="th" v-if="show.reason">生产备注</div>
                                    <div class="th" v-if="show.upstream_status">上游订单状态</div>
									<div class="th" style="width: 80px;">标旗</div>
									<div class="th" style="width: 80px;">身份照片</div>
									<div class="th" style="width: 80px;">操作</div>
								</div>
								<div class="list" v-for="item in orderlist" :key="item.id">
									<div class="td" style="width: 80px;" v-if="show.id" @dblclick="copy(item.id)">{{item.id}}</div>
									<div class="td" v-if="show.source_id" @dblclick="copy(item.source_id)">{{item.source_id}}</div>
                                    <div class="td" v-if="show.source" @dblclick="copy(item.source)">{{item.source}}</div>
									<div class="td" v-if="show.created_at">{{item.created_at}}</div>
                                    <div class="td" v-if="show.ordered_at">{{item.ordered_at}}</div>
									<div class="td" v-if="show.product_name"  @dblclick="copy(item.good_name)">{{item.good_name}}</div>
                                    <div class="td" v-if="show.fetch_code"  @dblclick="copy(item.good_sku)">{{item.good_sku}}</div>
									<div class="td" v-if="show.plan_mobile"  @dblclick="copy(item.plan_mobile)">{{item.plan_mobile}}</div>
									<div class="td" v-if="show.status" style="width: 80px;"  @dblclick="copy(item.status_name)">{{item.status_name}}</div>
									<div class="td" v-if="show.id_card_name" style="width: 80px;" @dblclick="copy(item.id_card_name)">{{item.id_card_name}}</div>
									<div class="td" v-if="show.id_card_num"  @dblclick="copy(item.id_card_num)">{{item.id_card_num}}</div>
                                    <div class="td" v-if="show.buyer_memo"  @dblclick="copy(item.buyer_memo)">{{item.buyer_memo}}</div>
									<div class="td" v-if="show.address"  @dblclick="copy(item.address_province+item.address_city+item.address_district+item.address)">
										<el-tooltip effect="dark" popper-class="tooltip" placement="top">
										  <div slot="content">{{item.address_province}}{{item.address_city}}{{item.address_district}}{{item.address}}</div>
										  <div>{{item.address_province}}{{item.address_city}}{{item.address_district}}{{item.address}}</div>
										</el-tooltip>
									</div>
									<div class="td" v-if="show.address_mobile"  @dblclick="copy(item.address_mobile)">{{item.address_mobile}}</div>
									<div class="td" v-if="show.address_name"  @dblclick="copy(item.address_name)">{{item.address_name}}</div>
									<div class="td" v-if="show.region_c"  @dblclick="copy(item.region_c+item.region_p)">{{item.region_c}}{{item.region_p}}</div>
									<div class="td" v-if="show.plan_mobile_produced"  @dblclick="copy(item.plan_mobile_produced)">{{item.plan_mobile_produced}}</div>
									<div class="td" v-if="show.seller_memo">
											<el-tooltip popper-class="tooltip" effect="dark" placement="top">
												<div slot="content">{{item.seller_memo}}</div>
												<div>{{item.seller_memo}}</div>
											</el-tooltip>
									</div>
									<div class="td"  @dblclick="copy(item.tracking_number)" v-if="show.tracking_number">{{item.tracking_number}}</div>
                                    <div class="td"  @dblclick="copy(item.tracking_company)" v-if="show.tracking">{{item.tracking_company}}</div>
									<div class="td" v-if="show.reason">
											<el-tooltip effect="dark" popper-class="tooltip" placement="top">
											  <div slot="content">{{item.reason}}</div>
											  <div>{{item.reason}}</div>
											</el-tooltip>
									</div>
                                    <div class="td" v-if="show.upstream_status">{{item.upstream_status}}</div>
									<div class="td" style="width: 80px;">
                                        <span @click="choosecolorid(item.id)" :style="{color:item.flag,fontSize:18+'px'}" class="iconfont icon-flag-fill"></span>
									</div>
									<div class="td" style="width: 80px;"><span @click="seephoto(item.id_card_num,item.id)">查看照片</span></div>
									<div class="td" style="width: 80px;">
										<el-dropdown @command="fix" @click.native='choosefixid(item.id)' trigger="click" v-if="func_I02">
										  <span class="el-dropdown-link">
											更多<i class="el-icon-arrow-down el-icon--right"></i>
										  </span>
										  <el-dropdown-menu slot="dropdown">
											    <el-dropdown-item command="fixpro">修改商品</el-dropdown-item>
												<el-dropdown-item command="fixorder">修改订单信息</el-dropdown-item>
												<el-dropdown-item command="backorder">取消订单</el-dropdown-item>
												<!-- <el-dropdown-item command="backpro">已退货</el-dropdown-item> -->
												<el-dropdown-item command="fast">加急处理</el-dropdown-item>
										  </el-dropdown-menu>
										</el-dropdown>
									</div>
								</div>
								<div class="orderfanye">
									<el-pagination background :page-size="search.size" :current-page="search.page" @current-change="fanye" layout="total,prev, pager, next" :total="search.total"></el-pagination>
								</div>
							</div>
						</div>
						
						<el-dialog title="修改商品" :visible.sync="fixprolog" width="30%" :close-on-click-modal="false">
                              <div style="padding-right: 30px;">
                                    <el-form ref="form" @submit.native.prevent :model="search" label-width="150px">
                                                <el-form-item label="通过商品名称修改:">
                                                    <el-input v-model="fixproname" :disabled="fixpronameshow" @input="searchproname" placeholder="输入商品名称"></el-input>
                                                </el-form-item>
                                                
                                                <el-form-item label="通过商品编码修改:">
                                                    <el-input v-model="fixprocode" :disabled="fixprocodeshow" @input="searchprocode" placeholder="输入商品编码"></el-input>
                                                </el-form-item>
                                                <el-form-item label="查询结果:">
                                                    {{fixpronames}}
                                                </el-form-item>
                                    </el-form>
                                    
                              </div>
                              <div slot="footer" class="dialog-footer">
                                <el-button @click="fixprolog = false">取 消</el-button>
                                <el-button type="primary" @click="fixprook()">确 定</el-button>
                              </div>
						</el-dialog>
						
						<el-dialog title="修改信息" :visible.sync="fixorderlog" :close-on-click-modal="false" width="30%">
                              <div>
                                    <el-form ref="form" @submit.native.prevent :model="search" label-width="90px">
                                            <div class="log">
                                                <el-form-item label="收货人">
                                                    <el-input v-model="fixchooselist.address_name" placeholder=""></el-input>
                                                </el-form-item>
                                                <el-form-item label="身份证姓名">
                                                    <el-input v-model="fixchooselist.id_card_name" placeholder=""></el-input>
                                                </el-form-item>
                                                <el-form-item label="身份证号">
                                                    <el-input v-model="fixchooselist.id_card_num" placeholder=""></el-input>
                                                </el-form-item>
                                                <el-form-item label="联系电话">
                                                    <el-input v-model="fixchooselist.address_mobile" placeholder=""></el-input>
                                                </el-form-item>
                                                <el-form-item label="收货地址">
                                                    <el-cascader @change="changeaddress" v-model="fixchooselist.city" :options="options"></el-cascader>
                                                    <el-input style=" margin-top: 20px;" v-model="fixchooselist.address" placeholder="详细地址"></el-input>
                                                </el-form-item>
                                                
                                            </div>
                                    </el-form>
                              </div>
                              <div slot="footer" class="dialog-footer">
                                <el-button @click="fixorderlog = false">取 消</el-button>
                                <el-button type="primary" @click="fixorderok()">确 定</el-button>
                              </div>
						</el-dialog>
						
						
						
						<el-dialog title="录入生产信息" :visible.sync="whiteprolog" :close-on-click-modal="false" width="30%">
                              <div>
                                    <el-form ref="form" @submit.native.prevent :model="search" label-width="90px">
                                            <div class="log">
                                              <el-form-item label="生产号码">
                                                <el-input v-model="fixchooselist.plan_mobile_produced" placeholder=""></el-input>
                                              </el-form-item>
                                            </div>
                                            <div class="log">
                                              <el-form-item label="运单号">
                                                <el-input v-model="fixchooselist.tracking_number" placeholder=""></el-input>
                                              </el-form-item>
                                            </div>
                                    </el-form>
                              </div>
                              <div slot="footer" class="dialog-footer">
                                <el-button @click="whiteprolog = false">取 消</el-button>
                                <el-button type="primary" @click="whiteprook()">确 定</el-button>
                              </div>
						</el-dialog>
						
						<el-dialog title="退货" :visible.sync="probacklog" :close-on-click-modal="false" width="30%">
                              <div>
                                    <el-form ref="form" @submit.native.prevent :model="search" label-width="90px">
                                            <div class="propipei">ID为<span>{{fixid}}</span>的订单将标记为已退货。</div>
                                            <div class="log">
                                              <el-form-item label="备注信息">
                                                    <el-input v-model="backproreason" placeholder=""></el-input>
                                              </el-form-item>
                                            </div>
                                    </el-form>
                              </div>
                              <div slot="footer" class="dialog-footer">
                                <el-button @click="probacklog = false">取 消</el-button>
                                <el-button type="primary" @click="probackok()">确 定</el-button>
                              </div>
						</el-dialog>
						
						<el-dialog title="加急" :visible.sync="fastlog" :close-on-click-modal="false" width="30%">
                              <div>
                                    <div class="propipei">ID为<span>{{fixid}}</span>的订单将标记为加急。</div>
                              </div>
                              <div slot="footer" class="dialog-footer">
                                <el-button @click="fastlog = false">取 消</el-button>
                                <el-button type="primary" @click="fastok()">确 定</el-button>
                              </div>
						</el-dialog>
						
						<el-dialog title="取消订单" :visible.sync="backorderlog" :close-on-click-modal="false" width="30%">
                              <div>
                                    <div class="propipei">ID为<span>{{fixid}}</span>的订单将标记为取消订单。</div>
                              </div>
                              <div slot="footer" class="dialog-footer">
                                <el-button @click="backorderlog = false">取 消</el-button>
                                <el-button type="primary" @click="backorderok()">确 定</el-button>
                              </div>
						</el-dialog>
						
						
						<el-dialog title="查看照片" :visible.sync="seephotolog" :close-on-click-modal="false" width="1254px">
                              <div class="logflex" v-loading="seephotoloading" style="width: 100%;">
                                   <div class="proimg div2" v-if="choose.face != ''"><img :src="choose.face" /></div>
                                   <div class="proimg div2" v-if="choose.face == ''">暂无照片</div>
                                   <div class="proimg div2" v-if="choose.back != ''"><img :src="choose.back" /></div>
                                   <div class="proimg div2" v-if="choose.back == ''">暂无照片</div>
                                   <div class="proimg div2" v-if="choose.hand != ''"><img :src="choose.hand" /></div>
                                   <div class="proimg div2" v-if="choose.hand == ''">暂无照片</div>
                                   <div class="protitle" v-if="func_I02">
                                        <el-upload
                                          class="upload-demo" :show-file-list="false" action="https://jsonplaceholder.typicode.com/posts/" :on-change="uploadok" :auto-upload="false">
                                          <el-button  type="primary" size="small" @click="fixchoose('face')">补充正面照片</el-button>
                                        </el-upload>
                                   </div>
                                   <div class="protitle" v-if="func_I02">
                                       <el-upload
                                         class="upload-demo" :show-file-list="false" action="https://jsonplaceholder.typicode.com/posts/" :on-change="uploadok" :auto-upload="false">
                                         <el-button  type="primary" size="small"  @click="fixchoose('back')">补充反面照片</el-button>
                                       </el-upload>
                                   </div>
                                   <div class="protitle" v-if="func_I02">
                                        <el-upload
                                          class="upload-demo" :show-file-list="false" action="https://jsonplaceholder.typicode.com/posts/" :on-change="uploadok" :auto-upload="false">
                                          <el-button  type="primary" size="small"  @click="fixchoose('hand')">补充免冠照片</el-button>
                                        </el-upload>
                                    </div>
                              </div>
                              <div slot="footer" class="dialog-footer">
                                <el-button type="primary" size="small"  @click="seephotogo">重新提交</el-button>
                              </div>
						</el-dialog>
                        
						<el-dialog title="标旗设置" :visible.sync="flaglog" :close-on-click-modal="false" width="600px">
						        <div style="display: flex;">
						            <div style=" padding:0 20px; position: relative; top: 5px; ">标旗：</div>
						            <el-radio-group v-model="flagradio" style="display: flex;">
						               <el-tooltip style="margin-right: 20px;" popper-class="tooltip" effect="dark" placement="top" v-for="item in flaglist" :key="item.id">
						                 <div slot="content">{{item.flag}}</div>
						                 <div><el-radio :label="item.type"><span :style="{color:item.color,fontSize:25+'px'}" class="iconfont icon-flag-fill"> </span></el-radio></div>
						               </el-tooltip>
						            </el-radio-group>
						        </div>
						        <div style="display: flex; margin-top: 20px; width: 530px;">
						            <div style=" padding:0 20px; position: relative; top: 5px; width: 100px;">修改备注：</div>
						            <el-input  type="textarea" :rows="3" placeholder="请输入备注" v-model="flagarea"></el-input>
						        </div>
						      <span slot="footer" class="dialog-footer">	
						        <el-button type="primary" @click="flagloggo">确定</el-button>
						      </span>
						</el-dialog>
					</div>	
			</div>
		</div>
		<!-- <foot></foot> -->
	</div>
</template>

<script>
	import axios from "axios";
	import top from '@/components/top.vue'
	import left from '@/components/left.vue'
	import foot from '@/components/foot.vue'
	import { regionData, CodeToText, TextToCode } from 'element-china-area-data'
	import moment from 'moment'  

	export default{
		components: {
			"left": left,
			"top": top,
			"foot": foot
		},
		name: 'kanban',
		data(){
			return{
                daochuing:false,
                daochuingz:"批量导出",
                flaglog:false,
                flagradio:0,
                flagarea:"",
                
                fixpronameshow:false,
                fixprocodeshow:false,
                fixproname:"",
                fixprocode:"",
                fixpronames:"",
                fixproid:"",
                
				colorname:"gray",
				show:{
					id:true,source_id:false,source:false,created_at:true,ordered_at:true,product_name:true,fetch_code:true,status:true,
					number:false,id_card_name:true,id_card_num:true,address:false,address_mobile:false,address_name:false,
					merchant_shop:false,plan_mobile:false,plan_mobile_produced:true,region_c:false,seller_memo:false,
					tracking_number:false,reason:false,tracking:false,buyer_memo:false,upstream_status:false
				},
				searchelse:false,
				fixstatusid:"",
				fixreasons:"",
				fixid:"",
				fixitemnum:"",
				fixsku:"",
				fixskuid:"",
				backproreason:"",
				shengchannum:"",
				yundannum:"",
				fixordermes:{
					city:"",
					id:"",
					address_name:"",
					id_card_name:"",
					id_card_num:"",
					address_mobile:"",
					address_province:"",
					address_city:"",
					address_district:"",
					address:"",
					plan_mobile_produced:"",
					tracking_number:""
				},
				value2:["ID","下单时间","产品名称","订单状态","生产号码","证件姓名","商品编码","身份证号"],
				
				address:"",
				options:regionData,
				pipeipro:"",
				shaixuan:[
					"ID","外部订单编号","订单来源","订单状态","下单时间","平台下单时间","商品名称","购买号码","商品编码","证件姓名","身份证号","买家备注","收货地址",
					"联系电话","收货人","归属地","生产号码","操作记录","物流单号","物流公司","生产备注","上游订单状态"
				],
				
				loading:false,
				fixstatuslog:false,
                
				seephotolog:false,
                seephotoloading:true,
                
				fixprolog:false,
				backorderlog:false,
				probacklog:false,
				fastlog:false,
				fixorderlog:false,
				backprolog:false,
				whiteprolog:false,
				choose:{
					face:"",
					back:"",
					hand:"",
					id:"",
					orderid:""
				},
				orderlist:[],
				search: {
					share_name:"",
					plan_mobile_produced:"",
					prolist:[],
					channel_id:"",
					product_ids:"",
					id_name:"",
					order_id:"",
					number:"",
					id_num:"",
					status:"",
					phone:"",
					buy_number:"",
					source_id:"",
                    source:"",
					product_sku:"",
					merchant_name:"",
					sp_id:"",
					page:1,
					size:20,
					total:100,
					product_name: "",
                    fetch_code:"",
					orderstatus: "",
					card_num: "",
                    time2:"",
                    
					time: [],
					start: "",
					end: "",
                    
                    timefix: [],
					starttime:"",
					endtime:"",
                    
					orderid: "",
					number: "",
					card_name: "",
					qudaolist: [],
					color:"",
                    address_mobile:""
				},
				fixchooselist:{},
                fixchooselist2:{},
				
				func_I02:false,
                shop_id:"",
				
                flaglist:[]
			}
		},
		created() {
            //按回车键搜索
            var that = this
            document.onkeydown = function(e){
            	var ev = document.all ? window.event : e;
            	if(ev.keyCode==13) {
            		that.dosearch()
            	}
            }
            
			//第一次加载设置一个默认的时间一个月  不然太卡
			this.search.end = moment().add(1, 'days').format("YYYY-MM-DD 00:00:00");
			this.search.start = moment().subtract(30, 'days').format("YYYY-MM-DD 00:00:00");
			
			this.search.time = [this.search.start,this.search.end]		
			this.getlist()
            this.getflag()
            //筛选记录
            if(localStorage.getItem("shaixuan") != "" && localStorage.getItem("shaixuan")){
            	var v2 = localStorage.getItem("shaixuan").split(",")
            	var arr = []
            	for(var i in v2){
            		arr.push(v2[i])
            	}
            	this.value2 = arr
            	this.choosezd(this.value2)
            }
            
            //权限问题
            var user = JSON.parse(localStorage.getItem('USER'));
            this.user_func = user.functions
            for( var i in this.user_func){
                var func_number = this.user_func[i].code
                if(func_number.indexOf("I02") >= 0){ this.func_I02 = true }
            }
            
            //获取店铺id
            axios.get('/api/gth/user/shop')
                .then(response => {
                    if(response.data.msg.code == 0){
                        that.shop_id = response.data.data.shop_id
                    }else{
                        if(response.data.msg.code == 50401){that.$router.push({ path: "/login" }); return false}
                        that.$message.error(response.data.msg.info);
                    }
                })
		},
		mounted() {

			//获取商品列表
				axios.get('/api/gth/order-pages?_page_size=100')
					.then(response => {
					  this.search.prolist = response.data.data.data
				})
				
		},
		methods: {
            //获取旗子
            getflag:function(){
              axios.get('/api/gth/shop/flag/info')
                  .then(response => {
                         
                         for( var i in response.data.data){
                           
                            if( response.data.data[i].type == 0){ response.data.data[i].color = "#e4dfd7"}
                            if( response.data.data[i].type == 1){ response.data.data[i].color = "#ee3f4d"}
                            if( response.data.data[i].type == 2){ response.data.data[i].color = "#ebb10d"}
                            if( response.data.data[i].type == 3){ response.data.data[i].color = "#229453"}
                            if( response.data.data[i].type == 4){ response.data.data[i].color = "#2775b6"}
                            if( response.data.data[i].type == 5){ response.data.data[i].color = "#8076a3"}
                         }
                         
                         this.flaglist = response.data.data 
                  })
            },
             //选择标旗id
            choosecolorid:function(id){
            	this.choose.id = id
                this.flaglog = true
                axios.get('/api/plan-market/order/memo?id='+id)
                	.then(response => {
                       this.flagarea = response.data.data.memo
                       this.flagradio = response.data.data.flag
                	})
            },
            //选择标旗确认
            flagloggo:function(){
                axios.post('/api/plan-market/order/flag',{color:this.flagradio,id:this.choose.id,memo:this.flagarea})
                	.then(response => {
                        this.flaglog = false
                		this.getlist()
                	})
            },
            //选择标旗
            choosecolor:function(val){
            	axios.post('/api/plan-market/order/flag',{color:val,id:this.choose.id})
            		.then(response => {
            			this.getlist()
            		})
            	
            },
            
            //跳转到上传页面
            goupload:function(){
                window.open(window.location.origin +  window.location.pathname +"#/upload?share_id="+this.shop_id)
            },
			//获取商品列表
			shoppro:function(){
				axios.get('/api/gth/order-pages?_page_size=100&title=')
					.then(response => {
					  this.search.prolist = response.data.data.data
				})
			},
			
			loggo:function(){
				
			},

			//选择标旗
			choosecolor:function(val){
				console.log(val)
				axios.post('/api/plan-market/order/flag',{color:val,id:this.choose.id})
					.then(response => {
						this.getlist()
					})
				
			},
			//复制功能
			copy:function(t){
				var that = this
				this.$copyText(t)
				.then(
				  res => {
				    that.$message.success("复制成功");
				  }
				);
			},

			//搜索更多
			searchelses:function(){
				this.searchelse = true
			},
			
			//导出
			daochu:function(){
				
					this.daochuing = true
                    this.daochuingz = "导出中..."
					if( this.search.time == null){
						this.search.start = ""
						this.search.end = ""
					}else{
						if(this.search.time[0] == undefined || this.search.time[0] == null){this.search.start = ""}else{this.search.start = this.search.time[0]}
						if(this.search.time[1] == undefined || this.search.time[1] == null){this.search.end = ""}else{this.search.end = this.search.time[1]}
					}
                    
                    if( this.search.timefix == null){
                    	this.search.starttime = ""
                    	this.search.endtime = ""
                    }else{
                    	if(this.search.timefix[0] == undefined || this.search.timefix[0] == null){this.search.starttime = ""}else{this.search.starttime = this.search.timefix[0]}
                    	if(this.search.timefix[1] == undefined || this.search.timefix[1] == null){this.search.endtime = ""}else{this.search.endtime = this.search.timefix[1]}
                    }
                    
                    this.search.product_sku = this.search.product_sku.trim()
                    this.search.source = this.search.source.trim()
                    this.search.orderid = this.search.orderid.trim()
                    this.search.plan_mobile_produced = this.search.plan_mobile_produced.trim()
                    this.search.id_num = this.search.id_num.trim()
                    this.search.address_mobile = this.search.address_mobile.trim()
                    this.search.buy_number = this.search.buy_number.trim()
                    this.search.source_id = this.search.source_id.trim()
                    this.search.id_name = this.search.id_name.trim()
                    
					var url = '/api/plan-market/order/export?type=4&flag=3&end_time='+this.search.end+'&start_time='+this.search.start+'&status='+this.search.status+
										'&end='+this.search.endtime+'&start='+this.search.starttime+
                                        '&_page='+this.search.page+'&_page_size='+this.search.size+
										'&product_sku='+encodeURIComponent(this.search.product_sku)+
                                        '&source='+this.search.source+
										'&order_id='+this.search.orderid+'&plan_mobile_produced='+
										this.search.plan_mobile_produced+'&card_num='+this.search.id_num+'&address_mobile='+this.search.address_mobile+'&plan_mobile='+this.search.buy_number+
										'&source_id='+this.search.source_id+'&card_name='+this.search.id_name+'&ids='+this.search.product_ids+'&color='+this.search.color
									
                    axios.get(url)
                        .then(response => {
                            if(response.data.msg.code == 0) {
                                    // var a = document.createElement('a');
                                    // a.setAttribute('href', response.data.data);
                                    // a.click();
                                    // this.daochuing = false
                                    // this.daochuingz = "批量导出"
                                    this.$router.push({
                                      path:'/order_export2'
                                    })
                            }else {
                                this.$message.error(response.data.msg.info);
                                this.daochuing = false
                                this.daochuingz = "批量导出"
                            }
                           
                        })    
				  

			},
			
			
			//选择省市区
			changeaddress:function(v){
				this.fixchooselist.address_province = CodeToText[v[0]],
				this.fixchooselist.address_city = CodeToText[v[1]],
				this.fixchooselist.address_district = CodeToText[v[2]]
				console.log("选中的省市区"+this.fixchooselist.address_province+this.fixchooselist.address_city+this.fixchooselist.address_district)
			},
           
			//获取待审核数据
			getlist:function(){
				var that = this
				this.loading = true
					
			
				if( this.search.time == null){
					this.search.start = ""
					this.search.end = ""
				}else{
					if(this.search.time[0] == undefined || this.search.time[0] == null){this.search.start = ""}else{this.search.start = this.search.time[0]}
					if(this.search.time[1] == undefined || this.search.time[1] == null){this.search.end = ""}else{this.search.end = this.search.time[1]}
				}
				if( this.search.timefix == null){
					this.search.starttime = ""
					this.search.endtime = ""
				}else{
					if(this.search.timefix[0] == undefined || this.search.timefix[0] == null){this.search.starttime = ""}else{this.search.starttime = this.search.timefix[0]}
					if(this.search.timefix[1] == undefined || this.search.timefix[1] == null){this.search.endtime = ""}else{this.search.endtime = this.search.timefix[1]}
				}
                
                this.search.product_sku = this.search.product_sku.trim()
                this.search.source = this.search.source.trim()
                this.search.orderid = this.search.orderid.trim()
                this.search.plan_mobile_produced = this.search.plan_mobile_produced.trim()
                this.search.id_num = this.search.id_num.trim()
                this.search.address_mobile = this.search.address_mobile.trim()
                this.search.buy_number = this.search.buy_number.trim()
                this.search.source_id = this.search.source_id.trim()
                this.search.id_name = this.search.id_name.trim()
                
				var url = '/api/gth/orders?type=1&end_time='+this.search.end+'&start_time='+this.search.start+'&status='+this.search.status+
                                    '&end='+this.search.endtime+'&start='+this.search.starttime+
									'&_page='+this.search.page+'&_page_size='+this.search.size+
									'&product_sku='+encodeURIComponent(this.search.product_sku)+
                                    '&source='+this.search.source+
                                    '&order_by=0'+
									'&order_id='+this.search.orderid+'&plan_mobile_produced='+
									this.search.plan_mobile_produced+'&card_num='+this.search.id_num+'&address_mobile='+this.search.address_mobile+'&plan_mobile='+this.search.buy_number+
									'&source_id='+this.search.source_id+'&card_name='+this.search.id_name+'&ids='+this.search.product_ids+'&color='+this.search.color
		
				axios.get(url)
					.then(response => {
                        
						for( var i in response.data.data.data){
							if( response.data.data.data[i].flag == 0){ response.data.data.data[i].flag = "#e4dfd7"}
							if( response.data.data.data[i].flag == 1){ response.data.data.data[i].flag = "#ee3f4d"}
							if( response.data.data.data[i].flag == 2){ response.data.data.data[i].flag = "#ebb10d"}
							if( response.data.data.data[i].flag == 3){ response.data.data.data[i].flag = "#229453"}
							if( response.data.data.data[i].flag == 4){ response.data.data.data[i].flag = "#2775b6"}
							if( response.data.data.data[i].flag == 5){ response.data.data.data[i].flag = "#8076a3"}
						}
						that.orderlist = response.data.data.data
						that.search.total = response.data.data.total
						that.loading = false
// 						for( var item in that.orderlist){
// 							console.log(that.orderlist[item])
// 						}
					})
			},

			//筛选字段
			choosezd:function(e){

				localStorage.setItem("shaixuan",e)
				if(e.indexOf("外部订单编号") > -1){this.show.source_id = true}else{this.show.source_id = false}
                if(e.indexOf("订单来源") > -1){this.show.source = true}else{this.show.source = false}
				if(e.indexOf("收货地址") > -1){this.show.address = true}else{this.show.address = false}
				if(e.indexOf("联系电话") > -1){this.show.address_mobile = true}else{this.show.address_mobile = false}
				if(e.indexOf("收货人") > -1){this.show.address_name = true}else{this.show.address_name = false}

				if(e.indexOf("下单时间") > -1){this.show.created_at = true}else{this.show.created_at = false}
                if(e.indexOf("平台下单时间") > -1){this.show.ordered_at = true}else{this.show.ordered_at = false}
				if(e.indexOf("ID") > -1){this.show.id = true}else{this.show.id = false}
				if(e.indexOf("证件姓名") > -1){this.show.id_card_name = true}else{this.show.id_card_name = false}
				if(e.indexOf("身份证号") > -1){this.show.id_card_num = true}else{this.show.id_card_num = false}
                if(e.indexOf("买家备注") > -1){this.show.buyer_memo = true}else{this.show.buyer_memo = false}
                if(e.indexOf("物流公司") > -1){this.show.tracking = true}else{this.show.tracking = false}
                
				if(e.indexOf("生产号码") > -1){this.show.plan_mobile_produced = true}else{this.show.plan_mobile_produced = false}
				if(e.indexOf("商品名称") > -1){this.show.product_name = true}else{this.show.product_name = false}
                if(e.indexOf("商品编码") > -1){this.show.fetch_code = true}else{this.show.fetch_code = false}
                
				if(e.indexOf("归属地") > -1){this.show.region_c = true}else{this.show.region_c = false}
				if(e.indexOf("归属地") > -1){this.show.region_p = true}else{this.show.region_p = false}
				if(e.indexOf("操作记录") > -1){this.show.seller_memo = true}else{this.show.seller_memo = false}

		
				if(e.indexOf("订单状态") > -1){this.show.status = true}else{this.show.status = false}
				if(e.indexOf("物流单号") > -1){this.show.tracking_number = true}else{this.show.tracking_number = false}
				if(e.indexOf("生产备注") > -1){this.show.reason = true}else{this.show.reason = false}
                
                if(e.indexOf("上游订单状态") > -1){this.show.upstream_status = true}else{this.show.upstream_status = false}

				if(e.indexOf("购买号码") > -1){this.show.plan_mobile = true}else{this.show.plan_mobile = false}
			
			},
			//单个图片上传
			uploadok:function(file){
                this.seephotoloading = true
				var that = this;
				var formData = new FormData();
				formData.append("id_num",this.choose.id);
				formData.append("order_id",this.choose.ordernum);
				formData.append("pic["+this.choose.orderid+"]", file.raw);
                formData.append("type","plan");
				axios.post('/api/ROS/plan/photo/cut',formData)
					.then(response => {
                        if(response.data.msg.code != 0){
                            that.$message.error(response.data.msg.info);
                        }else{
                           //单张上传完之后 获取最新图片
                           axios.get('/api/plan-market/order/photos/url?id_card_num='+that.choose.id+'&id='+that.choose.ordernum)
                           	.then(response => {
                                   if(response.data.msg.code != 0){
                                       that.$message.error(response.data.msg.info);
                                   }else{
                                       var random = Math.random()
                                       if( response.data.data.face_url != ''){that.choose.face = response.data.data.face_url + '?v='+ random}else{that.choose.face = ''}
                                       if( response.data.data.back_url != ''){that.choose.back = response.data.data.back_url + '?v='+ random}else{that.choose.back = ''}
                                       if( response.data.data.hand_url != ''){that.choose.hand = response.data.data.hand_url + '?v='+ random}else{that.choose.hand = ''}
                                       that.seephotoloading = false
                                   }
                           	})
                        }
					})
			},
            seephotogo:function(){
                var that = this
                  //调取更改状态
                  axios.post('/api/plan-market/plan/photo/status', {id:this.choose.ordernum})
                    .then(response => {
                        if(response.data.msg.code != 0){
                            that.$message.error(response.data.msg.info);
                        }else{
                            that.seephotolog = false
                            that.loading = true
                            that.$message({
                              message: '已更改订单状态',
                              type: 'success'
                            });
                            that.getlist()
                        }
                    })  
            },
            //修改产品查询
            searchproname:function(){
                
             
                if(this.fixproname == ""){
                    this.fixprocodeshow = false
                }else{
                    this.fixprocodeshow = true
                }
               
                this.fixpronames = "查询中..."
                axios.get('/api/plan-market/order-page/my?title='+encodeURIComponent(this.fixproname))
                	.then(response => {
                        if(response.data.msg.code != 0){
                        	this.$message.error(response.data.msg.info);
                        }else{
                            if(response.data.data == null){
                                this.fixpronames = "销售中心无该产品信息"
                                this.fixproid = ""
                            }else{
                                this.fixproid = response.data.data.id
                                this.fixpronames = response.data.data.title
                            }

                        }
                    })
            },
            searchprocode:function(){
                if(this.fixprocode == ""){
                    this.fixpronameshow = false
                }else{
                    this.fixpronameshow = true
                }
                this.fixpronames = "查询中..."
                axios.get('/api/plan-market/order-page/my?fetch_code='+encodeURIComponent(this.fixprocode))
                	.then(response => {
                        if(response.data.msg.code != 0){
                        	this.$message.error(response.data.msg.info);
                        }else{
                        	if(response.data.data == null){
                        	    this.fixpronames = "没有查询到商品"
                                this.fixproid = ""
                        	}else{
                                this.fixproid = response.data.data.id
                        	    this.fixpronames = response.data.data.title
                        	}
                        }
                    })
            },
            //修改商品ok
            fixprook:function(){
                var that = this
                axios.post('/api/plan-market/order/product/update', {page_id:this.fixproid,ids:this.fixid})
                  .then(response => {
                        if(response.data.msg.code != 0){
                              that.$message.error(response.data.msg.info);
                        }else{
                            console.log(response.data.data.error)
                            if(response.data.data.error == ""){
                               that.fixproing = false
                               that.$message({
                                 message: '修改商品成功',
                                 type: 'success'
                               });
                               that.getlist()
                               that.fixprolog = false
                            }else{
                               for(var i in response.data.data.error){
                                 that.$message.error(response.data.data.error[i]);
                                 break;
                               }
                               that.fixproing = false
                               that.getlist()
                               that.fixprolog = false
                            }
                              
                        }
                  })  
            },
			//修改状态确认
			fixstatusok:function(){
				//修改的status赋值到提交的字段上面
				if(this.fixchooselist.status == -5010){this.fixstatusid = -5010}
				if(this.fixchooselist.status == -460){this.fixstatusid = -460}
				if(this.fixchooselist.status == -200){this.fixstatusid = -200}
				if(this.fixchooselist.status == -100){this.fixstatusid = -100}
				if(this.fixchooselist.status == 0){this.fixstatusid = 0}
				if(this.fixchooselist.status == 100){this.fixstatusid = 100}
				if(this.fixchooselist.status == "初步审核"){this.fixstatusid = 120}
				if(this.fixchooselist.status == "待完善证件信息"){this.fixstatusid = 150}
				if(this.fixchooselist.status == 200){this.fixstatusid = 200}
				if(this.fixchooselist.status == 450){this.fixstatusid = 450}
				if(this.fixchooselist.status == 460){this.fixstatusid = 460}
				if(this.fixchooselist.status == 470){this.fixstatusid = 470}
				if(this.fixchooselist.status == 500){this.fixstatusid = 500}
				if(this.fixchooselist.status == 550){this.fixstatusid = 550}
				if(this.fixchooselist.status == -700){this.fixstatusid = -700}
				if(this.fixchooselist.status == 5000){this.fixstatusid = 5000}
				if(this.fixchooselist.status == 5010){this.fixstatusid = 5010}
				if(this.fixchooselist.status == 5100){this.fixstatusid = 5100}
				var that = this
				var params = new URLSearchParams();
				if(this.fixstatusid == -460 ||this.fixstatusid == -200 ||this.fixstatusid == 0 ){
					if(this.fixreasons == ""){
						this.$message.error('请输入原因');
						return false
					}
				}
				params.append('id', this.fixid);
				params.append('status', this.fixstatusid);
				params.append('remark', this.fixreasons);
				
				axios.post('/api/plan-market/order/status/update', params)
					.then(response => {
						if(response.data.msg.code != 0){
							this.$message.error(response.data.msg.info);
						}else{
							this.$message({
							  message: '修改状态成功',
							  type: 'success'
							});
							that.getlist()
							that.fixstatuslog = false
						}
					})
			},
			//搜索功能
			dosearch:function(){
                this.search.page = 1
				this.getlist()
			},
			//翻页功能
			fanye:function(page){
				this.search.page = page
				this.getlist()
			},
			//查看照片 标记出选中的订单id等信息
			seephoto:function(id,ordernum){
                this.choose.id = id
                this.choose.ordernum = ordernum
                //没加载之前
                this.seephotolog = true
                this.seephotoloading = true
                this.choose.face = ""
                this.choose.back = ""
                this.choose.hand = ""
                
                var that = this
                axios.get('/api/plan-market/order/photos/url?id_card_num='+id+'&id='+ordernum)
                	.then(response => {
                		if(response.data.data.name != ""){
                			that.fixchooselist.product_name = response.data.data.name
                            var random = Math.random()
                            if( response.data.data.face_url != ''){that.choose.face = response.data.data.face_url + '?v='+ random}else{that.choose.face = ''}
                            if( response.data.data.back_url != ''){that.choose.back = response.data.data.back_url + '?v='+ random}else{that.choose.back = ''}
                            if( response.data.data.hand_url != ''){that.choose.hand = response.data.data.hand_url + '?v='+ random}else{that.choose.hand = ''}
                            this.seephotoloading = false
                		}
                	})
			},
			//点击上传某张
			fixchoose:function(fbh){
				this.choose.orderid = fbh
				console.log("正在上传"+fbh+"的照片")
			},
			//实时查询产品
			founditem:function(){
				console.log("正在查询sku为"+this.fixchooselist.sku+"的产品")
				var that = this
				axios.get('/api/ROS/plan/order/select_product?sku='+this.fixchooselist.sku)
					.then(response => {
						if(response.data.data.name != ""){
							that.fixchooselist.product_name = response.data.data.name
						}
					})
			},
			//选中的id记录
			choosefixid:function(id){
				this.fixid = id
                var that = this
				axios.get('/api/plan-market/order/info?order_id='+id)
                    .then(response => {
                        
                         if(response.data.msg.code != 0){
                                that.$message.error(response.data.msg.info);
                            }else{
                                
                                that.fixchooselist = response.data.data
                                
                                that.fixchooselist.city = []
                                if(that.fixchooselist.status == "120"){that.fixchooselist.status = '初步审核'}
                            }
                        
                    })
			},
			//修改
			fix:function(e){
				if(e == "fixpro"){
					this.fixprolog = true
				}
				if(e == "whitepro"){
					this.whiteprolog = true
				}
				if(e == "fixorder"){
					this.fixorderlog = true
					var city = []
                    try{
                        if(this.fixchooselist.address_province != ""){
                        	city.push(TextToCode[this.fixchooselist.address_province].code)
                        }
                        if(this.fixchooselist.address_city != ""){
                        	city.push(TextToCode[this.fixchooselist.address_province][this.fixchooselist.address_city].code)
                        }
                        if(this.fixchooselist.address_district != ""){
                        	city.push(TextToCode[this.fixchooselist.address_province][this.fixchooselist.address_city][this.fixchooselist.address_district].code)
                        }
                    }catch(e){
                        console.log("从哪来的订单，别来搞老子")
                    }
					
					this.fixchooselist['city'] = city
                    console.log(this.fixchooselist.city)
				}
				
				if(e == "backpro"){
					this.probacklog = true
					//标记为已退货处理
					// 点确认执行probackok
				}
				if(e == "fast"){
					this.fastlog = true
					//标记为加急
					// 点确认执行fastok
				}
				if(e == "backorder"){
					this.backorderlog = true
					//标记为
					// 点确认执行backorderok
				}
				if(e == "refund"){
					this.$confirm('确定给ID为"'+this.fixchooselist.id+'"的订单执行退款操作吗?', '提示', {
						  confirmButtonText: '确定',
						  cancelButtonText: '取消',
						  type: 'warning'
						}).then(() => {
							var that = this
							this.loading = true
							var params = new FormData();
							params.append('id',this.fixchooselist.id);
							axios.post('/api/ROS/plan/order/refund', params)
							.then(response => {
								if(response.data.code != "SUCCESS"){
									this.$message.error(response.data.msg.info);
								}else{
									that.$message({
										type: 'success',
										message: '已处理退款!'
									});
									that.getlist()
								}
								that.loading = false
							})
						})
				}
				if(e == "fixstatus"){
					this.fixreasons = ""
					
					this.fixstatuslog = true
				}
				
				
				
			},
			//修改信息
			fixorderok:function(){
				var that = this
                axios.get('/api/plan-market/order/info?order_id='+this.fixid)
                    .then(response => {
                        
                         if(response.data.msg.code != 0){
                                that.$message.error(response.data.msg.info);
                            }else{
                                
                               var params = new URLSearchParams();
                               params.append('id', that.fixid);
                               if(that.fixchooselist.address_name != response.data.data.address_name){
                                   params.append('address_name', that.fixchooselist.address_name);
                               }
                               if(that.fixchooselist.id_card_name != response.data.data.id_card_name){
                                   params.append('id_card_name', that.fixchooselist.id_card_name);
                               }
                               if(that.fixchooselist.id_card_num != response.data.data.id_card_num){
                                   params.append('id_card_num', that.fixchooselist.id_card_num);
                               }
                               if(that.fixchooselist.address_province != response.data.data.address_province){
                                   params.append('address_province', that.fixchooselist.address_province);
                               }
                               if(that.fixchooselist.address_city != response.data.data.address_city){
                                   params.append('address_city', that.fixchooselist.address_city);
                               }
                               if(that.fixchooselist.address_district != response.data.data.address_district){
                                   params.append('address_district', that.fixchooselist.address_district);
                               }
                               if(that.fixchooselist.address != response.data.data.address){
                                   params.append('address', that.fixchooselist.address);
                               }
                               if(that.fixchooselist.address_mobile != response.data.data.address_mobile){
                                   params.append('address_mobile', that.fixchooselist.address_mobile);
                               }
                               
                               
                               
                               axios.post('/api/plan-market/order/info/update', params)
                               	.then(response => {
                               		if(response.data.msg.code != 0){
                               				that.$message.error(response.data.msg.info);
                               		}else{
                               			that.fixorderlog = false
                               			that.$message({
                               			  message: '修改状态成功',
                               			  type: 'success'
                               			});
                               			that.getlist()
                               		}
                               	})
                            }
                        
                    })
				
			},
			//修改产品确认
			// fixprook:function(){
			// 	var that = this
			// 	var params = new URLSearchParams();
			// 	
			// 	params.append('id', this.fixid);
			// 	params.append('sku', this.fixchooselist.sku);
			// 	if(this.fixchooselist.sku == ""){
			// 		this.$message.error('请先输入货号');
			// 		return false
			// 	}
			// 	axios.post('/api/plan-market/order/product/update', params)
			// 		.then(response => {
			// 			if(response.data.msg.code != 0){
			// 					this.$message.error(response.data.msg.info);
			// 			}else{
			// 				that.fixprolog = false
			// 				that.fixitemnum = ""
			// 				this.$message({
			// 				  message: '修改状态成功',
			// 				  type: 'success'
			// 				});
			// 				that.getlist()
			// 			}
			// 		})
			// },
			//修改订单信息
			fixorder:function(){
				
			},
			//修改生产信息
			whiteprook:function(){
				var that = this
				var params = new URLSearchParams();
				params.append('id', this.fixid);
				params.append('plan_mobile_produced', this.fixchooselist.plan_mobile_produced);
				params.append('tracking_number', this.fixchooselist.tracking_number);
				axios.post('/api/plan-market/order/info/update',params)
					.then(response => {
						if(response.data.msg.code != 0){
								this.$message.error(response.data.msg.info);
						}else{
								this.probacklog = false
								this.$message({
									message: '录入信息成功',
									type: 'success'
								});
								this.whiteprolog = false
								that.getlist()
						}
					})
			},
			//取消订单
			backorderok:function(){
				var that = this
				var params = new URLSearchParams();
				params.append('id', this.fixid);
				axios.post('/api/plan-market/order/cancel',params)
					.then(response => {
						if(response.data.msg.code != 0){
								this.$message.error(response.data.msg.info);
						}else{
								this.backorderlog = false
								this.$message({
								  message: '修改状态成功',
								  type: 'success'
								});
								that.getlist()
						}
					})
			},
			//退货确认
			probackok:function(){
				var that = this
				var params = new URLSearchParams();
				params.append('id', this.fixid);
				params.append('remark', this.backproreason);
				axios.post('/api/plan-market/order/return_product',params)
					.then(response => {
						if(response.data.msg.code != 0){
								this.$message.error(response.data.msg.info);
						}else{
								this.probacklog = false
								this.$message({
									message: '修改状态成功',
									type: 'success'
								});
								that.getlist()
						}
					})
			},
			//加急处理
			fastok:function(){
				var that = this
				var params = new URLSearchParams();
				params.append('id', this.fixid);
				axios.post('/api/plan-market/order/accelerate',params)
					.then(response => {
						if(response.data.msg.code != 0){
								this.$message.error(response.data.msg.info);
						}else{
							this.fastlog = false
							this.$message({
							  message: '修改状态成功',
							  type: 'success'
							});
						}
					})
			}
		}
	};
</script>

<style lang="scss" scoped>
	.index{
		.el-form-item{ margin-bottom: 10px;}
		.el-form-item__label{ font-size: 14px;}
		
				.o_ul{ 
					background: #F9F9F9; display: flex;
					.o_li{ 
						flex-basis: 160px; line-height: 45px; display: block; color: #727272; border-top: 3px #F9F9F9 solid; font-size: 14px; text-align: center;
					}
					.act{ border-top: 3px #DD2727 solid; background: #FFFFFF;}
				}
	
		.processing {
			width: 100%; overflow: hidden;
			
			background: #FFFFFF;
		}
		.eaeaea{ background: #E5E5E5;}
		.orderflex {display: flex;}
		
		
		.pro_top{ padding: 20px; position: relative;}
		.rtm{ position: absolute; right: 10px; bottom: 10px;}
		.ordersub{ padding-left: 90px; padding-top: 10px;
            .el-button--danger{margin-right: 20px;}
        }
		.list{  color: #727272; }
		.orderlist{ margin: 20px 0; width: 100%; overflow: auto; white-space:nowrap; position: relative; padding-bottom: 50px;}
		.list .th{ background: #E5E5E5; line-height: 45px; font-size: 14px; display: inline-block; width: 150px; margin: 0; text-align: center;}
		.list .td{ line-height: 45px; height: 45px;  display: inline-block; width: 150px; font-size: 14px; overflow: hidden; margin: 0; text-align: center;}
		.list .td span{ margin: 0 5px; color: #197CFF; cursor: pointer;}
		.list .el-dropdown-link{ font-size: 14px;}
		.orderfanye{  position: absolute; right: 10px; bottom: 10px;}
		
		.logflex{ display: flex; justify-content: space-around; flex-wrap: wrap;}
		.logflex .div2{  width: 377px; text-align: center; }
		.logflex .proimg{ display: flex; justify-content: center; align-items: center; height: 400px; background: #EAEAEA;}
		.logflex .proimg img{ max-width: 100%; max-height: 100%;}
		.protitle{ color: #197CFF; cursor: pointer; margin-top: 20px;}
		.propipei{ padding-left: 90px; font-size: 14px; margin-bottom: 20px;}
		.propipei span{ margin: 0 10px; color: #FF5053;}
		.colorli{ display: flex; width: 100px;}
		.colorli div{ flex: 1; justify-content: space-between; line-height: 34px; text-align: center;}
		.colorname{width: 60px; height: 24px; padding: 5px 20px; }
		.orderflex .el-form-item__label{ font-size: 14px;}
		.orderflex input{ width: 190px;}
		.log input{ width: 300px;}
	}
</style>

